package mk.com.ldm.corepoint.implementation.client.lib.wrappers.widgets;

import mk.com.ldm.corepoint.implementation.client.lib.generators.BaseWidget;
import mk.com.ldm.corepoint.implementation.shared.FormRow;

import com.google.gwt.user.client.ui.Label;

public class LabelWrapper extends BaseWidget {

	private Label label = new Label();
	
	public LabelWrapper(FormRow config) {
		super(config);
		this.setType(10);
		
		label.setWidth(this.LABEL_WIDTH);
		label.setText(config.getNam());
		if(!config.getSiz().equals("")){
			label.setWidth(config.getSiz().split(",")[0]+"px");
			if(config.getSiz().split(",").length > 1){
				label.setHeight(config.getSiz().split(",")[1]+"px");
			}
		}
		
		initWidget(label);
	}

	@Override
	public void setValue(String value){}
	@Override
	public String getValue(){ return null; }
	@Override
	public void setEnabled(Boolean enabled) {}
	@Override
	public void setVisible(Boolean visible) {label.setVisible(visible);}
	@Override
	public void setTitle(String title) {}
	@Override
	public String getTitle() {return null;}
	@Override
	public String getText() {return label.getText();}
	@Override
	public void setText(String text) { label.setText(text); }
	@Override 
	public String getName(){ return null; }
	@Override
	public void setName(String name){}
	@Override
	public void setFocus(boolean focus){}
	
}
